package cn.wenhe9.novel.domain.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author DuJinliang
 * 2022/6/2
 */
@Data
public class AuthorRegisterVo {
    @NotBlank(message="笔名不能为空！")
    @Pattern(regexp= "[\\u4e00-\\u9fa5a-zA-Z0-9]{4,8}",message="笔名格式不正确！")
    private String penName;

    @NotBlank(message="手机号不能为空！")
    @Pattern(regexp="^1[3|4|5|6|7|8|9][0-9]{9}$",message="手机号格式不正确！")
    private String telPhone;

    @NotBlank(message="QQ或微信不能为空！")
    private String chatAccount;

    @NotBlank(message = "电子邮箱不能为空！")
    @Email(message = "电子邮箱格式不正确")
    private String email;
//
//    @NotBlank(message = "作品方向不能为空")
//    @Pattern(regexp = "\\d[0|1]?", message = "作品方向不正确")
    private Integer workDirection;
}
